
#include <errno.h>

#include "common.h"
#include "WinSock.h"

#define USER_NAME_LEN 256
#define B64_USER_NAME_LEN 384
#define FILE_SIZE_READ 456//711
#define B64_FILE_SIZE_SEND 624//960
#define MSG_SIZE 1024
#define MSG_LINE_LEN 256

static char BOUNDARY[] = "07114003224";

int smtp_login(SOCKET fd, char *host, char *account, char *pass);

int initial_email(SOCKET fd, char *, char *, char *, char *, char *);

//int aio_upload_file(int, char *);

int normal_upload_file(int, char *);

int sendmail(SOCKET fd, char *, char *, char *, char *, char *);
int send_mail(SOCKET fd, char * from, char * to, char * subject, char * content, char * file);
int charset_convert(char * data);